import request from '@/utils/request'

// 查询采购申请列表
export function listPurchaseApply(query) {
  return request({
    url: '/myplan/purchaseApply/list',
    method: 'get',
    params: query
  })
}

// 查询采购申请详细
export function getPurchaseApply(id) {
  return request({
    url: '/myplan/purchaseApply/' + id,
    method: 'get'
  })
}

// 新增采购申请
export function addPurchaseApply(data) {
  return request({
    url: '/myplan/purchaseApply',
    method: 'post',
    data: data
  })
}

// 修改采购申请
export function updatePurchaseApply(data) {
  return request({
    url: '/myplan/purchaseApply',
    method: 'put',
    data: data
  })
}

// 删除采购申请
export function delPurchaseApply(id) {
  return request({
    url: '/myplan/purchaseApply/' + id,
    method: 'delete'
  })
}

// 导出采购申请
export function exportPurchaseApply(query) {
  return request({
    url: '/myplan/purchaseApply/export',
    method: 'get',
    params: query
  })
}